﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QuanLyCCN.Models
{
    public class ThanhPhoHuyenModels
    {
        public static QLCCNEntities context = new QLCCNEntities();

        public static List<District> GetDSThanhPhoHuyen()
        {
            var query = (from q in context.Districts 
                         select q).ToList<District>();
            return query;
        }

        public static void Add(District dt)
        {
            context.Districts.AddObject(dt);
            context.SaveChanges();
        }
    }
}